﻿<%@ Control Language="c#" AutoEventWireup="false" Inherits="Web.Control.WWW.Contacts.Search" %>
<script>
var M0006="<%=GetText("M0006")%>";
var C0003="<%=GetText("C0003") %>";
var C0005="<%=GetText("C0005")%>";
var C0007="<%=GetText("C0007")%>";
var C0008="<%=GetText("C0008") %>";
var C0009="<%=GetText("C0009") %>";
var C0010="<%=GetText("C0010") %>";
var C0011="<%=GetText("C0011") %>";
var C0024="<%=GetText("C0024") %>";
var C0027="<%=GetText("C0027") %>";
var C0029="<%=GetText("C0029") %>";
var C0066="<%=GetText("C0066") %>";
var C0068="<%=GetText("C0068") %>";

var CT000="<%=GetText("CT000") %>";
var CT001="<%=GetText("CT001") %>";
var CT002="<%=GetText("CT002") %>";
var CT003="<%=GetText("CT003") %>";
var CT004="<%=GetText("CT004") %>";
var CT005="<%=GetText("CT005") %>";
var CT006="<%=GetText("CT006") %>";
var CT007="<%=GetText("CT007") %>";
var CT009="<%=GetText("CT009") %>";
var CT011="<%=GetText("CT011") %>";
var CT012="<%=GetText("CT012") %>";
var CT066="<%=GetText("CT066") %>";

var gNoCount = "<%=GetText("CT055")%>";
var gCounts = "<%=GetText("CT010")%>"
var gCounts5 = "<%=GetText("CT054")%>";
var gMale = "<%=GetText("C0012")%>";
var gFemale = "<%=GetText("C0013")%>";
var gOnlineN = "<%=GetText("C0038")%>";
var gTypeD = "<%=GetText("CT008")%>";
var gDateFormat = "<%=GetText("C0033")%>";
var gStrDate = "<%=GetText("C0032")%>";
</script>
<div id="body_main">
	<div id="Title">
		<div class="h1 floatl"><%=GetText("M0006")%></div>
		<div class="floatr"><img src="/images/poweredby.gif" /></div>
		<div class="clear"></div>
	</div>
	<div class="Center9001">
		<div class="center9001content">
			<div class="content828" id="Content828ID">
				<div id="Filter" style="margin:10px 0px 10px 0px; background-color:#f3f8fe; text-align:left">
					<div>
						<div class="margin5"><strong><%=GetText("CT000")%></strong></div>
						<div id="tableA">
							<table border="0" cellspacing="0" cellpadding="3">
								<tr>
									<td>$CT001$:<br /><select id="selSpeakL" class="common180"> <option value="">$C0027$</option> <%=GetLanguageSelect(speakValc)%> </select></td>
									<td>$CT002$:<br /><select id="selLearnL" class="common180"> <option value="">$C0027$</option> <%=GetLanguageSelect(learnValc)%> </select></td>
									<td>$C0003$:<br /><select id="selCountry" class="common130"> <option value="">$C0029$</option>  <%=GetCountrySelect(nationValc)%> </select></td>
									<td>$C0010$:<br />
										<select id="selAge" class="common100">
											<option value="0-200">$C0024$</option>
											<option value="0-18">$CT003$</option>
											<option value="18-25">18-25</option>
											<option value="26-35">26-35</option>
											<option value="36-200">35+</option>
										</select>
									</td>
									<td>$C0011$:<br />
										<select id="selGender" class="common100">
											<option value="">$C0024$</option>
											<option value="1">$C0012$</option>
											<option value="0">$C0013$</option>
										</select>
									</td>
									<td>$C0008$:<br /><input id="textSearCity" type="text" class="common110" /></td>
								</tr>
							</table>
						</div>								
						<div><input id="bttSear" name="bttSear_name" type="button" value="$C0068$" class="button" onclick="SearBrowseDocs()" /> <input id="iconCheck" type="checkbox" <%=(isAvatarValc==1?"checked=\"checked\"":"")%>/> $CT004$&nbsp;&nbsp;<!--input id="isChatNowCheck" type="checkbox" <%=(isChatNowValc==1?"checked=\"checked\"":"")%> /> $CT066$&nbsp;&nbsp;--><input id="defaultSearquery" type="checkbox" checked="checked" />	$CT005$</div>
						<div class="margin5"><strong>$CT006$:</strong> <a href="#" onclick="LanExchangesOrBuddies(1)">$CT011$</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="#" onclick="LanExchangesOrBuddies(0)">$CT012$</a></div>
					</div>
				</div>						
			</div>
			<script>
			    var gContent828ID = document.getElementById("Content828ID").innerHTML;
				gContent828ID = gContent828ID.replace(/\$C0003\$/gi,C0003).replace(/\$C0008\$/gi,C0008).replace(/\$C0010\$/gi,C0010).replace(/\$C0011\$/gi,C0011).replace(/\$C0012\$/gi,gMale).replace(/\$C0013\$/gi,gFemale).replace(/\$C0024\$/gi,C0024);
				gContent828ID = gContent828ID.replace(/\$C0027\$/gi,C0027).replace(/\$C0029\$/gi,C0029).replace(/\$C0066\$/gi,C0066).replace(/\$C0068\$/gi,C0068).replace(/\$CT001\$/gi,CT001).replace(/\$CT002\$/gi,CT002).replace(/\$CT003\$/gi,CT003);
				gContent828ID = gContent828ID.replace(/\$CT004\$/gi,CT004).replace(/\$CT005\$/gi,CT005).replace(/\$CT006\$/gi,CT006).replace(/\$CT007\$/gi,CT007).replace(/\$CT008\$/gi,gTypeD).replace(/\$CT009\$/gi,CT009).replace(/\$CT011\$/gi,CT011);
				gContent828ID = gContent828ID.replace(/\$CT012\$/gi,CT012).replace(/\$CT066\$/gi,CT066);
				document.getElementById("Content828ID").innerHTML = gContent828ID;
				gContent828ID=null;
			</script>
			<div class="content628 margin20" style="padding-bottom:5px;border-bottom:1px #e1e1e1 solid;width:100%; text-align:left">
	            <div style="float:left"><div id="SearCount"><%=(SearchCount == 0 ? GetText("CT055") : (SearchCount > 499 ? GetText("CT054") : string.Format(GetText("CT010"), SearchCount)))%></div></div>
		        <div style="width:100px; float:right"><a href="#" class="photo_ic" onclick="PicRange(0)" ><img src="/Images/Display_Icon.gif" align="absmiddle"  alt=""/></a> <a href="#" class="photo_ic" onclick="PicRange(1)" ><img src="/Images/Display_List.gif" align="absmiddle" alt="" /></a></div>
		        <div class="Clear"></div>
	        </div>
			<!--Search result-->
			<div id="memberList">
			    <asp:Repeater ID="uList" runat="server">
				<ItemTemplate>
				<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:10px;padding-bottom:10px;border-bottom:1px #e1e1e1 solid;overflow:hidden">
					<tr>
						<td width="120" valign="top"><div class="Pic90"><a class="Photo_90" href="/<%#Eval("MemberNo") %>.htm"><%#Eval("Avatar").ToString() == "" ? "<img src=\"/Images/No_pic.gif\" />" : Eval("Avatar", "<img src=\"{0}\" />").ToString()%></a></div></td>
						<td width="200" valign="top">
							<div class="Blue14BU"><a href="/<%#Eval("MemberNo") %>.htm"><%#HttpUtility.HtmlEncode(Eval("NickName").ToString())%></a></div>
							<div><%#Eval("Age")%>, <%#GetGenderText(Eval("Gender").ToString())%>, $C0003$ <%#GetCountryText(Eval("Nationality").ToString())%></div>
							<div class="Orange10"><script>document.write(<%#(bool)Eval("Online") == true ? "gOnlineN" : ""%>);</script></div>
						</td>
						<td valign="top">$C0009$: <%#Eval("City").ToString() == "" ? "" : Eval("City").ToString()+", "%><%#GetCountryText(Eval("Country").ToString())%><br />$C0005$: <strong><%#GetLanguageText(Eval("MotherTongue").ToString())%><img src="/Images/Level5.gif" /><%#(Eval("MotherTongue2").ToString().Trim()=="")?"":", "+(GetLanguageText(Eval("MotherTongue2").ToString())+Eval("motherTongue2Level","<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("MotherTongue3").ToString().Trim() == "") ? "" : ", "+(GetLanguageText(Eval("MotherTongue3").ToString()) + Eval("motherTongue3Level", "<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("MotherTongue4").ToString().Trim() == "") ? "" : ", "+(GetLanguageText(Eval("MotherTongue4").ToString()) + Eval("motherTongue4Level", "<img src=\"/Images/Level{0}.gif\" />"))%></strong><br />$C0007$: <strong><%#(GetLanguageText(Eval("TargetLanguage").ToString()) + Eval("TargetLanguageLevel", "<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("TargetLanguage2").ToString().Trim()== "") ? "" : ", "+(GetLanguageText(Eval("TargetLanguage2").ToString()) + Eval("TargetLanguage2Level", "<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("TargetLanguage3").ToString().Trim()== "") ? "" : ", "+(GetLanguageText(Eval("TargetLanguage3").ToString()) + Eval("TargetLanguage3Level", "<img src=\"/Images/Level{0}.gif\" />"))%><%#(Eval("TargetLanguage4").ToString().Trim()== "") ? "" : ", "+(GetLanguageText(Eval("TargetLanguage4").ToString()) + Eval("TargetLanguage4Level", "<img src=\"/Images/Level{0}.gif\" />"))%></strong><br /><div><%#(Eval("Avatar_title").ToString() == "" ? "" : "<div class='thoughtbox'><div><div><div><div>" + HttpUtility.HtmlEncode(Eval("Avatar_title").ToString()) + "</div></div></div></div></div>")%></div></td>
					</tr>
				</table>
				</ItemTemplate>
				</asp:Repeater>      
			</div>
			<div class="clear"></div>
			<script>
				document.getElementById("memberList").innerHTML = document.getElementById("memberList").innerHTML.replace(/\$C0005\$/gi,C0005).replace(/\$C0007\$/gi,C0007).replace(/\$C0009\$/gi,C0009).replace(/\$C0003\$/gi,C0003);
			</script>
			<div id="divPage" class="content628 DisplayNone"></div>
		</div>
	</div>
</div>

<div id="SearCountItem" style="display: none;">$SearchCount$</div>
<div id="MemberTemple" style="display: none;">   
	<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:10px;padding-bottom:10px;border-bottom:1px #eee solid;overflow:hidden">
	  <tr>
		<td width="120" valign="top"><div class="Pic90"><a class="photo_90" href="/$MemberNo$.htm">$Avatar$</a></div></td>
		<td width="200" valign="top"><div class="Blue14BU"><a href="/$MemberNo$.htm">$NickName$</a></div>
		<div>$Age$,&nbsp;$Gender$,&nbsp;$C0003$ $Nationality$</div>
		<div class="Orange10">$Online$</div></td>
		<td valign="top">$C0009$: $City$ $Country$
            <br />$C0005$: <strong>$MotherTongue$ $MotherTongue2$ $MotherTongue3$ $MotherTongue4$</strong>
            <br />$C0007$: <strong>$TargetLanguage$ $TargetLanguage2$ $TargetLanguage3$ $TargetLanguage4$</strong>
            <br />$Avatar_title$</td>
	</tr>
	</table>
</div>
<div id="MemberTemple2" style="display: none;">   
	<div style="float:left; width:94px; margin-bottom:10px">
		<div class="Pic90"><a class="photo_90" href="/$MemberNo$.htm">$Avatar$</a></div>
		<div style=" text-align:center"><a href="/$MemberNo$.htm">$NickName$</a></div>            
    </div>   
</div>
<select id="selLang" style="display: none"><%=GetLanguageSelect("")%></select>
<select id="jselCountry" style="display: none"><%=GetCountrySelect("")%></select> 
<asp:Literal ID="litScript" runat="server" />
<script>
var memberLearn = "<%=memberInfo.TargetLanguage %>";
var memberSpeak = "<%=memberInfo.MotherTongue %>";
var learnVal="<%=learnValc %>";
var speakVal="<%=speakValc %>";
var nationVal="<%=nationValc %>";
var maxAgeVal="<%=maxAgeValc %>";
var minAgeVal="<%=minAgeValc %>";
var genderVal="<%=genderValc %>";
var cityVal="";
var isAvatarVal=<%=isAvatarValc %>==1 ? true:false;
var isChatNowVal=<%=isChatNowValc %>==1 ? true:false;
$get("selAge").value=minAgeVal+"-"+maxAgeVal;
$get("selGender").value=genderVal;
</script>